﻿using Dapper;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Data;
using System.Data.SqlClient;

namespace Max.PH6_2009A.LowCode.API.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class SystemLogController : ControllerBase
    {
        public SystemLogController()
        {
        }

        //[HttpGet]
        //public IActionResult Get()
        //{
        //    using (IDbConnection _db = DataAccess.DapperFactory.GetIDbConnection()) 
        //    {
        //        var result = _db.Query("select * from systemlog", null);

        //        return Ok(result);
        //    }
        //}

        //[HttpGet("id")]
        //public IActionResult GetById(string id)
        //{
        //    using (IDbConnection _db = DataAccess.DapperFactory.GetIDbConnection())
        //    {
        //        var result = _db.Query($"select * from systemlog where id=@id", new { id=id});

        //        return Ok(result.FirstOrDefault());
        //    }
        //}
    }
}
